package com.open.capacity.forum.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.forum.dto.ResourcesFileDto;
import com.open.capacity.forum.model.ResourcesFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 蒋鑫
 * @version 2021/3/2
 */
@Mapper
public interface ResourcesFileDao extends BaseMapper<ResourcesFile> {
    /**
     * 查询自己上传的全部资源
     *
     * @param params
     * @return
     */
    List<ResourcesFile> selectAllResources(@Param("params") Map<String, Object> params);

    /**
     * 查询全部可下载的资源
     * @param resourcesFileDto
     * @return
     */
    List<ResourcesFileDto> selectAll(ResourcesFileDto resourcesFileDto);
}
